package com.homegoods.designer.model;

import android.text.SpannableStringBuilder;
import android.text.TextUtils;

import com.homegoods.designer.util.Utils;

import java.io.Serializable;
import java.util.List;

/**
 * @author QiQi
 * @description 设计师主页上半部分数据
 */
public class DesignerHomeModel implements Serializable {
/**
 * bgimg：头像
 * city：所在城市
 * undergo：经验
 * range：范围
 * makeoffers：报价
 * intro：简介
 * attention：关注数
 * fans：粉丝数量
 * workslist：作品列表；数据格式：[{title:'标题',bgimg:'主图',area:'面积',family:'户型'}]
 */
    /**
     * 设计Id
     */
    private String id;

    /**
     * 设计师姓名
     */
    private String name;

    /**
     * 设计师所在地区
     */
    private String city;
    /**
     * 设计师经验
     */
    private String undergo;

    /**
     * 设计师头像
     */
    private String bgimg;

    /**
     * 设计师服务范围
     */
    private String range;

    /**
     * 设计师报价
     */
    private String makeoffers;

    /**
     * 简介
     */
    private String intro;

    /**
     * 关注数
     */
    private Integer attention;

    /**
     * 粉丝数
     */
    private Integer fans;

    private List<DesignerCaseModel> workslist;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getUndergo() {
        return undergo;
    }

    public void setUndergo(String undergo) {
        this.undergo = undergo;
    }

    public String getBgimg() {
        return bgimg;
    }

    public void setBgimg(String bgimg) {
        this.bgimg = bgimg;
    }

    public String getRange() {
        return range;
    }

    public void setRange(String range) {
        this.range = range;
    }

    public SpannableStringBuilder getMakeoffers() {
        if (TextUtils.isEmpty(makeoffers)) {
            return null;
        }
        return Utils.getOffer(makeoffers);
    }

    public void setMakeoffers(String makeoffers) {
        this.makeoffers = makeoffers;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getAttention() {
        return attention == null ? "0" : attention.toString();
    }

    public void setAttention(Integer attention) {
        this.attention = attention;
    }

    public String getFans() {
        return fans == null ? "0" : fans.toString();
    }

    public void setFans(Integer fans) {
        this.fans = fans;
    }

    public List<DesignerCaseModel> getWorkslist() {
        return workslist;
    }

    public void setWorkslist(List<DesignerCaseModel> workslist) {
        this.workslist = workslist;
    }

//   public class DesignerWorksBean {
//        private String bgimg;
//        private String title;
//        private String area;
//        private String family;
//
//        public String getBgimg() {
//            return bgimg;
//        }
//
//        public void setBgimg(String bgimg) {
//            this.bgimg = bgimg;
//        }
//
//        public String getTitle() {
//            return title;
//        }
//
//        public void setTitle(String title) {
//            this.title = title;
//        }
//
//        public String getArea() {
//            return area;
//        }
//
//        public void setArea(String area) {
//            this.area = area;
//        }
//
//        public String getFamily() {
//            return family;
//        }
//
//        public void setFamily(String family) {
//            this.family = family;
//        }
//    }

}
